package br.com.nooclix.salon.ui.util
{
	
	
	import br.com.nooclix.salon.ui.util.tooltip.ToolTipUtil;
	
	import flash.events.MouseEvent;
	
	import mx.controls.Button;
	import mx.events.ToolTipEvent;
	
	public class MenuButton extends Button
	{
		
		public var text:String;
		
		public function MenuButton(t:String)
		{
			super();
			text = t;
			configure();
		}
		
		private function configure():void{
			width = 80;
			height = 80;
			x = 3;
			alpha = 1;
			this.doubleClickEnabled = true;
			this.setStyle("cornerRadius","0");
			this.setStyle("fontFamily","Arial");
			this.setStyle("fontWeight","bold");
			this.setStyle("fontSize","15");
			this.toolTip = " ";
			this.addEventListener(ToolTipEvent.TOOL_TIP_CREATE,toolTipDispacher);
			this.addEventListener(ToolTipEvent.TOOL_TIP_SHOW,toolTipPositionDispacher);
			this.addEventListener(MouseEvent.DOUBLE_CLICK, function ():void{
				
			});
			
		}
		
		private function toolTipDispacher(tt:ToolTipEvent):void{
			ToolTipUtil.createCustomTip(text,tt);
		}
		
		private function toolTipPositionDispacher(tt:ToolTipEvent):void{
			ToolTipUtil.positionTip(tt);
		}
		
	}
	
}